package com.hongshan.wallet.core.wallet

import android.arch.lifecycle.ViewModelProviders
import android.databinding.ViewDataBinding
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.hongshan.wallet.BR
import com.hongshan.wallet.R
import com.hongshan.wallet.base.MyActivity
import com.hongshan.wallet.router.RouterIndex
import kotlinx.android.synthetic.main.activity_security_setting.*
import kotlinx.android.synthetic.main.appbar.*

/**
 * Copyright Zhangxx.
 * Copyright (c) 2019
 * All rights reserved
 *
 * @project  : Wallet
 * @package  : com.example.wallet.core.wallet
 * @author   : zhangxx
 * @date     : 2019/3/26
 * @email    : qq957413212@hotmail.com
 * @desc     : //TUDO
 */
@Route(path = RouterIndex.SECURITY_SETTING)
class SecuritySettingActivity: MyActivity<ViewDataBinding, SecuritySettingViewModel>() {

    override fun initVariableId() = BR.securityVm

    override fun initContentView(savedInstanceState: Bundle?) = R.layout.activity_security_setting

    override fun initViewModel() = ViewModelProviders.of(this)[SecuritySettingViewModel::class.java]

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        tvTitle.text = "安全设置"
        viewModel.getUserInfo()
        try {
            val field = rriv.javaClass.getDeclaredField("mRadius")
            field.isAccessible = true
            field.set(rriv,44*3)
            rriv.invalidate()
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }
}